<!-- 个人中心 -->
<template>
	<view v-if="chat_flag == 1">
		<u-navbar :is-back="true" title="明细详情"></u-navbar>
		<detail-list v-if="userId > 0" :userId="userId" ref="cash"></detail-list>
		<user-auth></user-auth>
	</view>
</template>

<script>
	import {mapState} from 'vuex';
	import detailList from "./detail-list.vue"; // 推荐
	export default {
		components: {
			detailList,
		},
		data() {
			return {
				userId: 0,
			}
		},
		onLoad(option) {
			this.userId = option.userId;
		},
		onReachBottom() {
			this.$refs.cash.load();
			console.log('到底');
		},
		computed: {
			...mapState(['vuex_user','chat_flag']),
		},
		methods: {
			init() {
				this.$refs.cash.init();
			},
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
